<#include "../macroes.html"/>
<@staticContent>
<script type="text/javascript" src="${path}/ueditor/ueditor.parse.js"></script>
<script src="http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shCore.js"></script>
<script src="http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shAutoloader.js"></script>
<script src="http://libs.baidu.com/fancybox/2.1.5/jquery.fancybox.js"></script>
<script src="http://libs.baidu.com/fancybox/2.1.5/helpers/jquery.fancybox-buttons.js"></script>
<script src="http://libs.baidu.com/fancybox/2.1.5/helpers/jquery.fancybox-thumbs.js"></script>
<script src="http://libs.baidu.com/fancybox/2.1.5/helpers/jquery.fancybox-media.js"></script>
<link href="http://libs.baidu.com/SyntaxHighlighter/3.0.83/styles/shCoreDefault.css" rel="stylesheet">
<link href="http://libs.baidu.com/fancybox/2.1.5/jquery.fancybox.css" rel="stylesheet" media="screen"/>
<link href="http://libs.baidu.com/fancybox/2.1.5/helpers/jquery.fancybox-buttons.css" rel="stylesheet" media="screen"/>
<link href="http://libs.baidu.com/fancybox/2.1.5/helpers/jquery.fancybox-thumbs.css" rel="stylesheet" media="screen"/>
<style>
.syntaxhighlighter {
  background-color: #FAFAFA!important;
}
.syntaxhighlighter .line.alt1 {
  background-color: #FAFAFA!important;
}
.syntaxhighlighter .line.alt2 {
  background-color: #FAFAFA!important;
}
</style>
<!-- <script src="${path}/SyntaxHighlighter/scripts/shCore.js"></script> -->
<!-- <script src="${path}/SyntaxHighlighter/scripts/shAutoloader.js"></script> -->
<!-- <link href="${path}/SyntaxHighlighter/styles/shCoreDjango.css" rel="stylesheet"> -->
<div class="row">
  <div class="col-md-8">
  	<#if crumbs??>
  		<@crumbMacro crumbs=crumbs></@crumbMacro>
  	</#if>
	<div class="panel panel-default">
	 	<div class="panel-body">
	 		<h4>
				<#if artDetail.type==0>
				<span class="icon yuan">原</span>
				<#else>
				<span class="icon zhuan">转</span>
				</#if>
				<span title="${artDetail.title}">${artDetail.title}</span>
			</h4>
			<h6>
				类别: <a href="${path}/project/${artDetail._project.id}.html">${artDetail._project.name}</a>&nbsp;|&nbsp;
				发布于:${artDetail._createDateTime}&nbsp;|&nbsp;
				已有${artDetail.viewCount}次阅读,
				<span class="ds-thread-count" data-thread-key="${artDetail.id}" data-count-type="comments"></span>
			</h6>
			<div class="blogCnt" id="content">
				${artDetail.content}
			</div>
			<br/>
			<#if artDetail.type == 0>
			<div class="well well-sm small">
				声明：此文是作者原创，转载请注明地址。
			</div>
			<#else>
			<div class="well well-sm small">
				本文转载于:<a href="${artDetail.url!}" target="_blank">${artDetail.url!}</a>
			</div>
			</#if>
			<div class="clearfix">
				<div class="small">
					标签:
					<#list artDetail._tags as tag>
						<a href="${path}/tag/${tag}.html" class="label label-info">
							${tag}
						</a>
						&nbsp;
					</#list>
				</div>
				<div class="bdsharebuttonbox pull-right">
					<a href="#" class="bds_more" data-cmd="more"></a>
					<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
					<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
					<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
					<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
					<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
				</div>
			</div>
			<hr/>
			<ul class="pager">
				<#if previous??>
				  <li class="previous"><a data-placement="right" data-toggle="tooltip" title="${previous.title}" href="${path}/article/${previous.id}.html">上一篇</a></li>
				</#if>
				<#if next??>
				  <li class="next"><a data-placement="left" data-toggle="tooltip" title="${next.title}" href="${path}/article/${next.id}.html">下一篇</a></li>
				</#if>
			</ul>
	 	</div>
	</div>
				
	<@commentMacro article=artDetail></@commentMacro>
  </div>
  
  <div class="col-md-4">
	<@hotArtMacro hotArticles=hotsView></@hotArtMacro>
	<@proMacro projects=projects></@proMacro>
	<@comListMacro></@comListMacro>
	<@myTab tags=tags></@myTab>
  </div>
</div>
<script type="text/javascript">
uParse('#content', {
    rootPath: '${path}/ueditor/'
});
SyntaxHighlighter.autoloader(
		'bash  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushBash.js',
        'cpp  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushCpp.js',
        'css  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushCss.js',
        'c#  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushCSharp.js',
        'groovy  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushGroovy.js',
        'html  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushXml.js',
        'java  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushJava.js',
        'jfx  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushJavaFx.js',
        'js  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.js',
        'php  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushPhp.js',
        'plain  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushPlain.js',
        'python  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushPython.js',
        'ruby  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushRuby.js',
        'scala  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushScala.js',
        'sql  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushSql.js',
        'xml  http://libs.baidu.com/SyntaxHighlighter/3.0.83/scripts/shBrushXml.js'
	);
SyntaxHighlighter.defaults['gutter'] = false;
SyntaxHighlighter.all();
<!-- 百度分享 -->
window._bd_share_config={
		"common":
			{"bdSnsKey":{},
			"bdText":"",
			"bdMini":"2",
			"bdMiniList":
				["mshare","qzone","tsina","weixin","sqq","renren","douban","tqq","tieba","bdhome","hi","diandian","youdao","sdo","qingbiji","mail"],
			"bdPic":"",
			"bdStyle":"1",
			"bdSize":"24"
			},
		"share":{}
};
with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

<!-- 多说评论 -->
var duoshuoQuery = {short_name:"binarylife"};
(function() {
	var ds = document.createElement('script');
	ds.type = 'text/javascript';ds.async = true;
	ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
	ds.charset = 'UTF-8';
	(document.getElementsByTagName('head')[0] 
	 || document.getElementsByTagName('body')[0]).appendChild(ds);
})();

$('.blogCnt img').each(function(){
	$(this).wrap('<a class="fancybox" href="'+this.src+'"></a>');
});
$(".fancybox").fancybox({
	padding: 0,
	openEffect : 'elastic',
	openSpeed  : 150,
	closeEffect : 'elastic',
	closeSpeed  : 150,
	closeClick : true,
	helpers : {
		overlay : {
			css : {
				'background' : 'rgba(238,238,238,0.85)'
			}
		}
	}
});
</script>

</@staticContent>
